﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WechatModel
{
    /// <summary>
    /// 微信自定义菜单类型
    /// </summary>
    public class WMenuType
    {
        /// <summary>
        /// 普通按钮
        /// </summary>
        public static string Button { get { return "click"; } }
        /// <summary>
        /// 链接按钮
        /// </summary>
        public static string LinkButton { get { return "view"; } }
        /// <summary>
        /// 扫描二维码
        /// </summary>
        public static string ScanCodeOnly { get { return "scancode_push"; } }
        /// <summary>
        /// 扫描二维码并弹出“等待消息”
        /// </summary>
        public static string ScanCodeAndWait { get { return "scancode_waitmsg"; } }
        /// <summary>
        /// 拍照
        /// </summary>
        public static string TakePhoto { get { return "pic_sysphoto"; } }
        /// <summary>
        /// 拍照或从相册中选择图片
        /// </summary>
        public static string TakePhotoOrChoose { get { return "pic_photo_or_album"; } }
        /// <summary>
        /// 从相册中选择图片
        /// </summary>
        public static string Album { get { return "pic_weixin"; } }
        /// <summary>
        /// 地址位置选择器
        /// </summary>
        public static string Location { get { return "location_select"; } }
    }
    public class W_MenuInfo
    {
        private string _name;
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string name
        {
            get { return _name; }
            set { _name = value; }
        }

        private string _type;
        /// <summary>
        /// 菜单类型
        /// </summary>
        public string type
        {
            get { return _type; }
            set { _type = value; }
        }

        private string _key;
        /// <summary>
        /// 命令KEY
        /// </summary>
        public string key
        {
            get { return _key; }
            set { _key = value; }
        }

        private string _url;
        /// <summary>
        /// 跳转地址
        /// </summary>
        public string url
        {
            get { return _url; }
            set { _url = value; }
        }

        private List<W_MenuInfo> _sub_button;
        /// <summary>
        /// 子菜单
        /// </summary>
        public List<W_MenuInfo> sub_button
        {
            get { return _sub_button; }
            set { _sub_button = value; }
        }
    }
}
